<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var nums = new Array()
        // var nums = new Array(12,4,43,121,76,8,3) 
        var nums = [12,4,43,121,76,8,3]

        console.log(nums[0], nums[3])
        console.log(nums.length)
        console.log(nums[9]) // undefined

        /**
         * 常用方法
         */
        console.log(nums)
        // console.log(nums.reverse())

        // nums.push(100)
        // console.log(nums)

        // console.log(nums.join('-'))

        // console.log(nums.indexOf(43))

        console.log(nums.slice(1,3)) // 左闭右开
        console.log(nums.slice(1))


    </script>
</body>
</html>